﻿using System;
using System.Collections.Generic;
using System.Text;

namespace BSE.Windows.Test
{
    public class Chufang
    {
        private Lingyao lingyao;
        private string patientName = "";
        private int patientSex = 0;
        private int patientAge = 0;
        private string patientCardNo = "";
        private string hospitalNo = "";
        private string illness = "";
        private Yishi doctor;
        private string takerName = "";
        private string takerCardNo = "";
        private string releaserName = "";
        private string auditorName = "";
        private string batchNo = "";
        private Keshi patientDept;
        private Keshi doctorDept;
        private int isHospital = 1;
        private int isCancer = 0;
        private int serial = 0;

        public Lingyao Lingyao
        {
            get { return lingyao; }
            set { lingyao = value; }
        }

        public DateTime ChufangDate
        {
            get { return lingyao.LingyaoDate; }
            set { lingyao.LingyaoDate = value; }
        }

        public string ChufangCode
        {
            get { return lingyao.LingyaoCode; }
            set { lingyao.LingyaoCode = value; }
        }

        public String YaopinID
        {
            get { return lingyao.LingyaoYaopin.YaopinID; }
            set { lingyao.LingyaoYaopin.YaopinID = value; }
        }

        public String YaopinCode
        {
            get { return lingyao.LingyaoYaopin.YaopinCode; }
            set { lingyao.LingyaoYaopin.YaopinCode = value; }
        }

        public String YaopinName
        {
            get { return lingyao.LingyaoYaopin.YaopinName; }
            set { lingyao.LingyaoYaopin.YaopinName = value; }
        }

        public String YaopinGuige
        {
            get { return lingyao.LingyaoYaopin.YaopinGuige; }
            set { lingyao.LingyaoYaopin.YaopinGuige = value; }
        }

        public String YaopinDanwei
        {
            get { return lingyao.LingyaoYaopin.YaopinDanwei; }
            set { lingyao.LingyaoYaopin.YaopinDanwei = value; }
        }

        public int ChufangYaopinCount
        {
            get { return -lingyao.LingyaoNumber; }
            set { lingyao.LingyaoNumber = -value; }
        }

        public String DoctorID
        {
            get { return doctor.YishiID; }
            set { doctor.YishiID = value; }
        }

        public String DoctorCode
        {
            get { return doctor.YishiCode; }
            set { doctor.YishiCode = value; }
        }

        public String DoctorName
        {
            get { return doctor.YishiName; }
            set { doctor.YishiName = value; }
        }

        public String DoctorDeptID
        {
            get { return doctor.YishiKeshiID; }
            set { doctor.YishiKeshiID = value; }
        }

        public String DoctorDeptCode
        {
            get { return doctorDept.KeshiCode; }
            set { doctorDept.KeshiCode = value; }
        }

        public String DoctorDeptName
        {
            get { return doctorDept.KeshiName; }
            set { doctorDept.KeshiName = value; }
        }

        public String PatientDeptCode
        {
            get { return patientDept.KeshiCode; }
            set { patientDept.KeshiCode = value; }
        }

        public String PatientDeptName
        {
            get { return patientDept.KeshiName; }
            set { patientDept.KeshiName = value; }
        }

        public string PatientName
        {
            get { return patientName; }
            set { patientName = value; }
        }

        public int PatientSex
        {
            get { return patientSex; }
            set { patientSex = value; }
        }

        public int PatientAge
        {
            get { return patientAge; }
            set { patientAge = value; }
        }

        public string PatientCardNo
        {
            get { return patientCardNo; }
            set { patientCardNo = value; }
        }

        public string HospitalNo
        {
            get { return hospitalNo; }
            set { hospitalNo = value; }
        }

        public string Illness
        {
            get { return illness; }
            set { illness = value; }
        }

        public Yishi Doctor
        {
            get { return doctor; }
            set { doctor = value; }
        }

        public string TakerName
        {
            get { return takerName; }
            set { takerName = value; }
        }

        public string TakerCardNo
        {
            get { return takerCardNo; }
            set { takerCardNo = value; }
        }


        public string ReleaserName
        {
            get { return releaserName; }
            set { releaserName = value; }
        }

        public string AuditorName
        {
            get { return auditorName; }
            set { auditorName = value; }
        }

        public string BatchNo
        {
            get { return batchNo; }
            set { batchNo = value; }
        }

        public Keshi PatientDept
        {
            get { return patientDept; }
            set { patientDept = value; }
        }

        public Keshi DoctorDept
        {
            get { return doctorDept; }
            set { doctorDept = value; }
        }

        public int IsHospital
        {
            get { return isHospital; }
            set { isHospital = value; }
        }

        public int IsCancer
        {
            get { return isCancer; }
            set { isCancer = value; }
        }

        public bool Cancer
        {
            get { return isCancer != 0; }
            set { isCancer = value ? 1 : 0; }
        }

        public int Serial
        {
            get { return serial; }
            set { serial = value; }
        }

        public Chufang()
        {
            lingyao = new Lingyao();
            doctor = new Yishi();
            patientDept = new Keshi();
            doctorDept = new Keshi();
        }
    }
}
